package com.lening.iot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.iot.dao.ParkinglotDAO;
import com.lening.iot.dto.ParkinglotDTO;
import com.lening.iot.po.ParkinglotPO;
import com.lening.iot.service.ParkinglotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:11
 */
@Service
public class ParkinglotServiceImpl extends BaseServiceImpl<ParkinglotDAO, ParkinglotPO, ParkinglotDTO> implements ParkinglotService{
    @Autowired(required = false)
    private ParkinglotDAO parkinglotDAO;
    @Override
    public Page<ParkinglotDTO> getAllPkl(Page<ParkinglotDTO> parkinglotDTOPage) {
        Page<ParkinglotDTO> pklList = parkinglotDAO.getAllPkl(parkinglotDTOPage);
        return pklList;
    }

    @Override
    public List<ParkinglotDTO> getAll(String communityname) {
        return parkinglotDAO.getAll(communityname);
    }

    @Override
    public Page<?> page(ParkinglotDTO parkinglotDTO) {
        return parkinglotDAO.getAllPkl(parkinglotDTO);
    }

    @Override
    public ParkinglotPO getById(Long id) {
        return this.parkinglotDAO.getById(id);
    }
}
